<!DOCTYPE html>
<html lang="zh-cn" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改密码</title>
    <link rel="stylesheet" href="../../static/layui/css/layui.css">
    <link rel="stylesheet" href="../../static/css/login/register.css">
</head>
<body>
<div class="title">
    <h3 style="font-weight: bold;">密码修改</h3>
    <hr class="layui-bg-green">
</div>
<form class="layui-form modify-passwd-form">
    <div class="layui-form-item">
        <label class="layui-form-label">手机号：</label>
        <div class="layui-input-block">
            <input id="username" type="text" name="username" th:value="${username}" autocomplete="off" class="layui-input" readonly>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">旧密码：</label>
        <div class="layui-input-block">
            <input type="password" name="oldPasswd" value="" lay-verify="oldPasswd" placeholder="6-8位字母或数字" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">新密码：</label>
        <div class="layui-input-block">
            <input type="password" name="newPasswd" value="" lay-verify="newPasswd" placeholder="6-8位字母或数字" class="layui-input">
        </div>
    </div>
    <div class="layui-btn-group sbtn">
        <button type="submit" class="layui-btn  layui-btn-normal" lay-filter="m_submit" lay-submit>提交</button>
        <button type="reset" class="layui-btn  layui-btn-normal">重置</button>
    </div>
</form>
</body>
<script src="../../static/layui/layui.js"></script>
<script src="../../static/js/jquery-3.4.1.js"></script>
<script src="../../static/js/login/register.js"></script>
<script>
    window.onload=function (ev) {
      var username=$("#username").val();
      if (username==null||username==""){
          layer.open({
              type:1,
              title:'Tips',
              content:'<p style="text-align: center;padding: 15px;"><i class="layui-icon layui-icon-face-cry"></i>&nbsp;登录信息有误，请重新登录！</p>',
              skin:'layui-layer-molv',
              area:['250px','160px'],
              offset:['60px','470px'],
              shade:['0.5','#6d4b0e'],
              btn:'确认',
              yes:function () {
                  layer.close(layer.index);
                  parent.location.href="/login/login";
              }
          })
      }
    };
</script>
</html>